<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let str = `this is for4 everyone for5ever`;

        console.log(str.match(/\bfor\d\b/g));



    </script>
</body>

</html>